package remin;

import java.sql.*;
import java.awt.*;

public class NapTab {
	
	static int n = 0;
	
	public static void Napln(){
		try{
		
		Statement s = DBCon.conn.createStatement();
        s.executeQuery("select * from reminder order by datum_cas");
        ResultSet rs = s.getResultSet();
        
        while(rs.next()){
        	String[] riadok = {rs.getString(1), rs.getString(2).substring(0, 16), 
        			rs.getString(3).trim(), rs.getString(4).trim(), rs.getString(5)};
        	RemGui.tab.addRow(riadok);
        	n++;
        	
        }
    	RemGui.comm.setText("Obsah DB vypisany...");
		}catch(Exception e){
			RemGui.comm.setText("Nevydalo...");
		}
	}
	
	

}
